# -*- coding:utf-8 -*-

from com.mat.rpa.utils.globalConstants import GlobalConstants
from com.mat.rpa.views.workWindow.leftPanel.directiveTree import treeItem
from . import sheetOperationConstants

class SheetOperationSubDirectiveTree(treeItem.TreeItemWithID):
    def __init__(self, parent):
        super(SheetOperationSubDirectiveTree, self).__init__(parent)
        self.createSheetOperationTreeNode()

    def createSheetOperationTreeNode(self):
        self.nodeType = GlobalConstants.treeBranchType
        self.directiveType = "sheetOperation"
        self.setText(0,"Sheet页操作")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, sheetOperationConstants.SheetOperationConstants.addingSheetDirective, "添加Sheet页")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, sheetOperationConstants.SheetOperationConstants.activatingSheetDirective, "激活Sheet页")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, sheetOperationConstants.SheetOperationConstants.copyingSheetDirective, "拷贝Sheet页")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, sheetOperationConstants.SheetOperationConstants.deletingSheetDirective, "删除Sheet页")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, sheetOperationConstants.SheetOperationConstants.renamingSheetDirective, "重命名Sheet页")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, sheetOperationConstants.SheetOperationConstants.gettingTheSheetNameDirective, "获取Sheet页名称")
